<template>
  <div>
    <div class="shopcard" @click="handlepass(itm.id)">
      <img :src="itm.image" alt="" />
      <p>{{ itm.store_info }}</p>
      <h3><span>￥</span>{{ itm.price }}</h3>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  props: {
    itm: {},
  },
  methods: {
    handlepass(idx) {
      this.$router.push({ path: `/detail/${idx}` });
    },
  },
};
</script>

<style lang="less" scoped>
.shopcard {
  width: 21vh;
  height: 228px;
  margin-bottom: 10px;
  margin: 10px 2px;
  text-align: center;
  background: #fff;
  border-radius: 15px;
  img {
    width: 100%;
    height: 172px;
    border-radius: 15px 15px 0 0;
  }
  p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
    padding: 2px 10px;
  }
  h3 {
    text-align: left;
    font-size: 18px;
    color: #e93323;
    padding: 0px 10px;
    span {
      font-size: 13px;
    }
  }
}
</style>
